package com.example.recordingpen_datacollection.Utils;

import java.util.Random;

public class VerificationCodeGenerator {
    public static String generateVerificationCode(int codeLength) {
        Random random = new Random();
        StringBuilder code = new StringBuilder();

        for (int i = 0; i < codeLength; i++) {
            int digit = random.nextInt(10); // 生成0-9之间的随机数字
            code.append(digit);
        }
        return code.toString();
    }
}
